package com.neusoft.poker;

public class Card {
    String suit;
    Integer rank;

    public Card(String suit, Integer rank) {
        this.suit = suit;
        this.rank = rank;
    }

    @Override
    public String toString() {
        String new_rank = "";
        switch (rank){
            case 14:
            {
                new_rank = "A";
                break;
            }
            case 11:
            {
                new_rank = "J";
                break;
            }
            case 12:
            {
                new_rank = "Q";
                break;
            }
            case 13:
            {
                new_rank = "K";
                break;
            }
            default:{
                new_rank = new_rank + rank;
                break;
            }

        }
        return suit + new_rank;
    }

    public static void main(String[] args) {
        Card card = new Card("红桃",5);
        System.out.println(card);
    }
}
